{% extends "layout.j2" %}
{% block content %}
  {% for user in user_list %}
    <article class="media content-section">
      <img class="rounded-circle article-img" src="{{ url_for('static', filename='profile_pics/'+user.image_file) }}" >
      <div class="media-body row justify-content-between">
        <div class="col-4">
          <h2><a class="article-title" href="{{ url_for('users.user_posts', username=user.username) }}">{{ user.username }}</a></h2>
          <span class="badge badge-info">{{ user.email }}</span>
        </div>
        <div class="col-5 align-self-center">
          <a class="btn btn-warning btn-sm m-1" href="{{ url_for('users.admin_reset_user', user_id=user.id) }}">Reset Password</a>
          <a class="btn btn-danger btn-sm m-1" href="{{ url_for('users.admin_delete_user', user_id=user.id) }}">Delete</a>
          {# TODO:添加确认 #}
        </div>
      </div>
    </article>
  {% endfor %}
{% endblock content %}